﻿using KinonekoSoftware.CodariaDB.Documents.Keywords;

namespace KinonekoSoftware.CodariaDB.Documents.Index
{
    public abstract class _Lockable : _Glossary, IStory, IImpression, IImpressionOperation
    {
        private bool _isDeleted;
        private bool _isLocked;

        public bool IsLocked
        {
            get => _isLocked;
            set => SetValue(ref _isLocked, value);
        }

        public bool IsDeleted
        {
            get => _isDeleted;
            set => SetValue(ref _isDeleted, value);
        }


        string IStory.Id   => Id;
        string IStory.Name => Name;

        IEnumerable<Keyword> IImpressionOperation.GetKeywords(KeywordEngine engine) => engine.GetKeywords(Id);
        IEnumerable<Impression> IImpressionOperation.GetImpressions(ImpressionEngine engine) => engine.GetImpressions(Id);
    }
}